package com.whty.springcloud.eurekaClient2;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * http://www.cnblogs.com/chry/p/7248947.html
 * @title EurekaClientApplication
 * @author 11
 * @date 2018年6月22日 下午1:39:17
 * @Description TODO
 */
@SpringBootApplication
@EnableEurekaClient
@RestController
public class EurekaClientApplication {
	
	@Value("${server.port}")
    String port;
	
	public static void main(String[] args) {
        SpringApplication.run(EurekaClientApplication.class, args);
        System.out.println("-------------------------------Eureka Client Started Successfully-------------------------------");
    }

    @RequestMapping("/")
    public String home() {
        return "hello world from port " + port;   
    }
}
